package com.imu.common.exception;

import javax.servlet.http.HttpServletRequest;

import com.imu.common.utils.R;

public class ErrorUtil {
	public static R errorMesg(HttpServletRequest request,ErrorDesc msgCode){
		/*String browserLanguage=request.getHeader("Accept-Language");
    	if(browserLanguage.substring(0, 5).equals("zh-TW")){
        	browserLanguage="tw";
        }else {
        	browserLanguage=browserLanguage.substring(0, 2);//截取浏览器语言的前两位   判断是中文还是英文
		}*/
    	//if(browserLanguage.equals("en")){


    	/*}else if (browserLanguage.equals("tw")) {
    		return R.error(msgCode.getCode(), msgCode.getTwMsg());
		}else if (browserLanguage.equals("ja")) {
			return R.error(msgCode.getCode(), msgCode.getJpMsg());
		}else {
			return R.error(msgCode.getCode(), msgCode.getMsg());
		}*/
		return R.error(msgCode.getCode(), msgCode.getMsg());
	}
}
